package com.ruoyi.common.core.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @Description TODO
 * @Author 基础下拉选择实体
 * @Date 2022/8/4 15:27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseSelect implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 节点ID */
    private Long id;

    /** 父节点ID */
    private Long pid;

    /** 节点名称 */
    private String label;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<BaseSelect> children;

    public BaseSelect(Long id, String label) {
        this.id = id;
        this.label = label;
    }
}
